<html>
	<head>
		<title></title>
		<link rel="stylesheet" href="style.css">	
	</head>
	<body>
		<table>
			<tr>
				<td colspan="2" id="pageheader">
					health information system
				</td>
			</tr>
			<tr>
				<td id="mainnav">
					<div class="menuitem"><a href = "cho_list.php">CHO lists</a></div>
					<div class="menuitem"> sub districts </div>
					<div class="menuitem"><span class="menuitem" ><a href = "cho_add.php" target="_blank">Add to the cho table</a></div>
					<div class="menuitem">Pin number</div>
					<div class="menuitem"></div>
					<div class="menuitem"></div>
				</td>
				<td id="content">
					<div id="divPageMenu">
						<span class="menuitem" >sub districts</span>
						<span class="menuitem" >communities</span>
						<span class="menuitem" >view map</span>
						<input type="text" id="txtSearch">
						<span class="menuitem">search</span>		
					</div>
					<div id="divStatus" class="status">
		
					</div>
					<div id="divContent">
						Edit Cho
<?php
	include("cho.php");
	if(!isset($_REQUEST['id'])){
		echo " no id";
		exit();
	}
	$vid=$_REQUEST['id'];
	$obj=new cho();
	if(isset($_REQUEST['cho_name'])){
		$community_name=$_REQUEST['cho_name'];    
		$subdistrict_id=$_REQUEST['subdistrict_id'];
		$pin_number=$_REQUEST['pin_number'];
		$obj->update_cho($idcho,$cho_name,$subdistrict_id,$pin_number);
	}
	
	$row=$obj->get_cho_id($vid);
	
?>
		<form action="cho_edit.php" method="GET" >
			<table class="tableForm" >
					<tr>
						<td class="label">CHO Name: </td>
						<td class="field"><input type="text" value="<?php echo $row['cho_name'] ?>" name="cho_name" ></td>
					</tr>
					<tr>
						<td class="label">Subdistrict_id:</td> 
						<td class="field"><input type="text" value="<?php echo $row['subdistrict_id'] ?>" name="subdistrict_id" >
						</td>
					</tr>
					<tr>
						<td class="label">Pin Number:</td>
						<td class="field"><input type="text" value="<?php echo $row['pin_number'] ?>" name="pin_number" >
						</td>
					</tr>
					<tr>
						<td class="label"></td>
						<td class="field">
							<input type="submit" value="save" name="submit" >
						</td>
					</tr>
			</table>
				
			<input type="hidden" value="<?php echo $vid ?>" name="id" >
		</form>

	</body>
</html>	